import io

s='abcdefg'
sio=io.StringIO(s)
print(sio.getvalue())
sio.seek(3)
sio.write('###')
print(sio.getvalue())